package com.mashuai.utils.ztest.toolkit.msHttp;

import cn.hutool.http.HttpResponse;
import cn.hutool.http.HttpUtil;

public class MsHttpTest {
    public static void main(String[] args) {
        // 请求URL
        String url = "http://39.153.206.186:8090/BWM_GROUP/JsFrame/ExtProxy/PurchaseMng/ArrivalOrderProxy.aspx";

        // 请求参数
        String params = "<Data><Action>GETALL</Action><GUID>4B953B62F2BF4F4CB8EC6F5AC285CB49</GUID><BILLFLAG>1</BILLFLAG></Data>";
        String cookies ="td_cookie=888450873; syncplant_lan=zh; platform_cookie=Name=ADMIN&Pwd=pVPJylan6YDm9RVoaHb9Qg==; ASP.NET_SessionId=rpfui345xewzf4n42vwjjs55; i18next=zh; .ASPXAUTH=E6D55C7B5DC67A7D7CF712C3F3AC8A4815A22BB1E634A5BAB9A6C9D983B5AA5B263E5C866AE430ABD70830FD53988D45ADE9772DDEF761C07E1EFFF3CDD05AAFBCBC33ADA847124EEF35D29BAAF3B8C9B86130EFD2AE03622DE45E313C491826EEAA1CCD3E98FED172B15EB8F292296101AA29A4";

                // 发送POST请求
        HttpResponse response = HttpUtil.createPost(url)
                .header("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8")
                .header("cookie",cookies)
                .body(params)
                .execute();

        // 输出响应内容
        System.out.println(response.body());
    }
}
